package com.example.mydesignmodule.iterator;

import java.util.ArrayList;
import java.util.List;

/**
 * @author tgw
 * @date 2021/3/5
 * @describe
 */
class PeopleCompany implements IteratorCompany {
    private List<People> peopleList;

    public PeopleCompany() {
        peopleList = new ArrayList<>();
        peopleList.add(new People(1, "tgw1"));
        peopleList.add(new People(2, "tgw2"));
        peopleList.add(new People(3, "tgw3"));
    }


    @Override
    public Iterator itertor() {
        return new ConCreateIterator<>(peopleList);
    }
}
